<?php $current = "current";?>
	<script src="<?=base_url();?>js/lb/js/prototype.js" type="text/javascript"></script>
	<script src="<?=base_url();?>js/lb/js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
	<script src="<?=base_url();?>js/lb/js/lightbox.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?=base_url();?>js/lb/css/lightbox.css" type="text/css" media="screen" />

<div id="border">
<form name="" method="post" action="<?=site_url("classify/search_result")?>">   
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
     <td valign="top">       
        <table width="705" border="0" align="center" id="usertitle">
          <tr>
            <td><h3><? echo $Z_TRANS->value('menu_classified_ads')." ".$Z_TRANS->value('title_detail');?></h3></td>
            <td align="right"><a href="<?=site_url("classify/goto_addnew_classify/".htmlspecialchars($Z_USER["user_login"]))?>"><input class="post_ads" name="" type="button" value=" <?=$Z_TRANS->value('menu_post_job')?> " /></a>
            </td>
          </tr>
        </table>
        <div id="register">
        <div style="text-align:right; margin-top:7px; margin-right:5px;">
            <?=$Z_TRANS->value('menu_search')?>: 
            <input type="text" id="txtsearch" name="txtsearch" maxlength="80" /> 
            <?=$Z_TRANS->value('menu_in')?> <select id="cbocategory" name="cbocategory">
           <option value="0">All Categories</option>
           <?php foreach($all_cate->result() as $category):?>
           <option value="<?=$category->classify_id;?>"><?=$category->classify_desc;?></option>
           <?php endforeach; ?>
            </select>
            <input type="button" id="btnsearch" name="btnsearch" value="<?=$Z_TRANS->value('btn_search')?>" onclick="goto_search()" />
         </div>
        <div class="user_line_border_top">&nbsp;</div>
          <div style="margin:10px auto;"></div>
          <? $getimg=$this->m_classify->select_classify_img($ads_detail['product_id']);?>           
            
          	<div class="full_detail">
            	<div align="right"><a name="fb_share"></a>                     
				<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" 
                            type="text/javascript">
                    </script>
                </div>
				<h3 style="color:#000"><?=htmlspecialchars($ads_detail['product_name']);?></h3>
                <div style="color:#009900; margin:0px 0 6px 0;  font-size:11px;">
                	<?=$Z_TRANS->value('title_posted_by')?>: <a href="#"><?=htmlspecialchars($ads_detail['user_login']);?></a> | <?=$Z_TRANS->value('title_date')?>: <?=htmlspecialchars($ads_detail['date_post']);?> | 
                	<?=$Z_TRANS->value('title_hit')?>: <?php $total_hit=$this->m_classify->get_product_hit($ads_detail['product_id']); ?>
                    
                  <font color="#333"><?=count($total_hit->result_array());?></font>
                    

                  <div style="border-bottom:#ccc 1px dotted; margin:6px 10px 6px 0;"> </div>
                </div>	
                <div><?=nl2br(htmlspecialchars($ads_detail['product_desc']));?></div>
				<div style="color:#BD2031; font-size:13px; font-weight:bold; margin-top:20px;">Price: <?=htmlspecialchars($ads_detail['price']);?>$</div>
                <div style="font-weight:bold;margin-top:25px;color:#009900;">Contact Info:</div>
                <table width="100%" border="0" cellpadding="0" cellspacing="0" style="padding:0; margin:0; clear:both; color:#666" >
                  <?php if($ads_detail['contact_name']!=""){?>
                  <tr>
                    <td width="6%">Name:</td>
                    <td width="94%"><?=htmlspecialchars($ads_detail['contact_name']);?></td>
                  </tr>
                  <? }?>
                  <?php if($ads_detail['phone']!=""){?>
                  <tr>
                    <td>Phone:</td>
                    <td><?=htmlspecialchars($ads_detail['phone']);?></td>
                  </tr>
                  <? }?>
                  <?php if($ads_detail['email']!=""){?>
                  <tr>
                    <td>Email:</td>
                    <td><?=htmlspecialchars($ads_detail['email']);?></td>
                  </tr>
				  <? }?>
                  <?php if($ads_detail['fax']!=""){?>
                  <tr>
                    <td>Fax </td>
                    <td><?=htmlspecialchars($ads_detail['fax']);?></td>
                  </tr>
                  <? }?>
                  <?php if($ads_detail['classify_desc']!=""){?>
                  <tr>
                      <td>Category:</td>
                      <td><?=htmlspecialchars($ads_detail['classify_desc']);?></td>
                    </tr>
                   <tr>
                   <? }?>
                   <?php if($ads_detail['address']!=""){?>
                  <tr>
                    <td>Address:</td>
                    <td><?=htmlspecialchars($ads_detail['address']);?></td>
                  </tr>
                  <? }?>
    
                  <tr style="display:none">
                    <td>Website:</td>
                    <td><?=htmlspecialchars($ads_detail['website']);?></td>
                  </tr>

                </table>

          </div>
			<div style="font-size:12px; color:#333; padding:10px; text-align:center;  border-top:#ddd 1px solid;">
                 <?php $str_path = str_replace("\\", "/", FCPATH);
				   $numItems = count($getimg->result_array()); 
				   $imgs = $str_path.$ads_detail['file_path'].$ads_detail['img_name']; 
				   if($ads_detail['img_name']<>"" && file_exists ($imgs)) {
					  echo "<p>".$Z_TRANS->value('title_enlarge_images')."</p><br>";
				   }else {   
				   	  echo $Z_TRANS->value('title_no_images');
				   }
                   foreach($getimg->result() as $imgname){					  
				   	  $file_name = current(explode(".", $imgname->img_name));
					  $file_ext  = next(explode(".", $imgname->img_name));
				   	  $filename = $str_path.$ads_detail['file_path'].$file_name.".".$file_ext;         			
					  ?>
                      <? if($imgname->img_name<>"" && file_exists ($filename)){ ?>
						<a href="<?=base_url();?><?=$ads_detail['file_path'];?><?=$file_name.".".$file_ext;?>" rel="lightbox[]" title=""><img src="<?=base_url();?><?=$ads_detail['file_path'];?><?=$file_name."_Thumb.".$file_ext;?>" height="32" width="32" /></a> 
					  <? }

				}?>	
            </div>
        </div>
        
        </td>
        <td width="254" valign="top">
		<?php include APPPATH."views/templates/common/right_content.php"; ?>
         </td>
         
      </tr>
  </table>
  </form>
</div>



